from imgUtils import ImageCert
import glob


# level 几等奖
# catg 类别
# name 学生的名字
# object_name 作品名
# teach_name 教师的名字
# id
def make_image(level,catg,student_name,object_name,teach_name,_id):
    # 1.载入图片
    new_img = ImageCert("./background/绘画二.jpg","./hwxk.ttf")
    # 2. 写入学生的名字
    # new_img.set_font_size(80);
    # new_img.draw_text((380,1230),student_name);
    # # 
    # # 3. 写入学生的作品名
    # new_img.set_font_size(80);
    # new_img.draw_text((800,1850),object_name);

    # # 4. 写入教师的名
    # new_img.set_font_size(80);
    # new_img.draw_text((800,1995),teach_name);

    # # 5. 二维码
    # new_img.qrcode((460,2130),_id)

    # 6 章
    new_img.pasteImg((1250,2230),"./eos.png")

    # new_img.save()

# make_image(1,"绘画二","学生名","作品名1,2,3","教师名","https://www.xxjyxiehui.com/myassets/202203/index.html#testid")

jpgs = glob.glob("./background/*")
for j in jpgs:
    new_img = ImageCert(j,"./hwxk.ttf")
    new_img.pasteImg((1230,2200),"./eos.png",1.3,1.3)
    new_img.save(j)
